import request from 'lib/request';

// 获取健康可餐食物分类列表

export function queryFoodCategoryList(){
  return request("wechat/food/findAllCategory",{
    method: "GET",
  })
}

// 获取健康可餐列表
export function queryFoodsByCategory(categoryId){
  let body = {
    categoryId,
  }
  return request("wechat/food/findAllFoodByCid?"+"categoryId="+categoryId,{
    method: "GET",
  })
}

// 获取食物详情
export function queryFoodDetail(id) {
  let body = {
    id,
  }
  return request('wechat/food/findAllById?'+"id="+id,{
    method: "GET",
  });
}

// 搜索食物
export function searchFood(name) {
  let body = {
    name
  }
  return request.post('wechat/food/findAllLikeName?'+"name="+name,{
    method: "GET",
  });
}
